package com.why.catchMsg.controller;

import com.arronlong.httpclientutil.exception.HttpProcessException;
import com.why.catchMsg.web.WebRequstUrl;
import com.why.catchMsg.service.HttpClientService;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/user")
@Api(description = "用户模块api")
public class UserController {

    @Autowired
   HttpClientService httpClientService;


    @ApiOperation(value="获取用户信息", notes="获取用户信息名字")
    @RequestMapping(value = "top",method = RequestMethod.GET)
    public String top() throws HttpProcessException {
        String json= httpClientService.get(WebRequstUrl.USER_TOP,null);
//        UserLoginDto userLoginDto=JsonMapper.string2Obj(json, new TypeReference<UserLoginDto>() {});
        return json;
    }







}
